refactor: Phase 1 consolidation — fewer files, less duplication#6
Merged
Conversation
Remove sandbox.yaml, teardown-ocp.sh, delete-sandboxes.sh, sandbox-check.sh, sandbox.sh. Update references in remaining files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- parse_agent: TOML parsing shared by sandbox-podman.sh, sandbox-ocp.sh - build_provider_flags: provider iteration shared by both sandbox scripts - stage_harness_dir: GWS + sandbox.env staging shared by both flows - strip_ansi: replaces inline sed in test-flow.sh - Fix AGENT_FILE unbound variable in sandbox-ocp.sh Tested: bats 29/29, podman 13/13 (25s), ocp 14/14 (132s) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
startup.sh: remove dead .claude.json write (Claude Code overwrites it). Keep only sandbox.env sourcing and gh auth setup-git. lib/common.sh: remove stale functions superseded by lib/agent.sh: active_gateway, require_ocp_gateway, detect_providers, PROVIDER_NAMES, write_sandbox_env, stage_sandbox_creds, available_providers. Simplify require_local_gateway to check 127.0.0.1 directly. Tested: bats 29/29, podman 13/13 (23s), ocp 14/14 (202s) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the improvement plan: consolidate before adding features.
sandbox.yaml,teardown-ocp.sh,delete-sandboxes.sh,sandbox-check.sh,sandbox.sh(5 files, 362 lines)lib/agent.sh— shared TOML parsing (parse_agent), provider flag building (build_provider_flags), credential staging (stage_harness_dir), ANSI stripping (strip_ansi). Used bysandbox-podman.sh,sandbox-ocp.sh,test-flow.sh.startup.sh— remove dead.claude.jsonwrite (Claude Code overwrites it on startup)lib/common.sh— remove 7 stale functions superseded bylib/agent.sh:active_gateway,require_ocp_gateway,detect_providers,PROVIDER_NAMES,write_sandbox_env,stage_sandbox_creds,available_providers(145 lines)Test results
Test plan
bats test/preflight.bats— 29/29./test-flow.sh podman --full— 13/13./test-flow.sh ocp --full— 14/14🤖 Generated with Claude Code